home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / aminet / misc / amag / sh9301e.lha / Maxon-CPP-Demo / Include / fstream.h < prev    next >
C/C++ Source or Header  |  1993-02-17  |  836b  |  46 lines

  1. #ifndef _INCLUDE_FSTREAM_H
  2. #define _INCLUDE_FSTREAM_H
  3. #ifndef _INCLUDE_STREAM_H
  4. #include <stream.h>
  5. #endif
  6.  
  7. typedef long streampos;
  8. typedef long streamoff;
  9.  
  10. class fstreambase: public virtual ios
  11. { protected:
  12.    fstreambase(FILE *f=0);
  13.    ~fstreambase();
  14.   public:
  15.    FILE *open(const char*, int);
  16.    void close();
  17.    int buffer(unsigned s);
  18.    void flush();
  19.    int seekg(long, int=ios::beg);
  20.    long tellg();
  21. };
  22.  
  23. class ofstream: public ostream, public fstreambase
  24. { public:
  25.    ofstream();
  26.    ofstream(const char*, int = ios::out);
  27.    ~ofstream();
  28. };
  29.  
  30. class ifstream: public istream, public fstreambase
  31. {
  32.   public:
  33.    ifstream();
  34.    ifstream(const char*, int = ios::in);
  35.    ~ifstream();
  36. };
  37.  
  38. class fstream: public ostream, public istream, public fstreambase
  39. { public:
  40.    fstream();
  41.    fstream(const char*, int);
  42.    ~fstream();
  43. };
  44. #endif
  45.  
  46.